app.controller('shopLocatedViewCtrl', ['$scope', 'utilService', 'shopLocatedViewService', '$modal', '$stateParams', 'toaster', '$state',
    function ($scope, utilService,shopLocatedViewService, $modal, $stateParams, toaster, $state) {
        //定义交互对象
        $scope.shopLocated = {};
        //取得参数
        $scope.id = $stateParams.id;

        //初始化调用函数
        $scope.init = function () {
            //初始化调用查询所有方法
            $scope.findById();
        }

       //根据ID查询
        $scope.findById = function () {
            shopLocatedViewService.findById($scope).then(function (result) {
                switch (result.status) {
                    case 200:
                        $scope.shopLocated = result.data;
                        break;
                    default:
                        toaster.pop('error', "操作失败", "发生未知错误！请联系管理员");
                        break;
                }
            });
        }
    }
]);